
package game;
import boundaryToMatador.GUI;

public class GUIout {

	public GUIout()
	{
		
	}
	
	public void startGUI()
	{
		GUI.create("fields1.txt");
	}
	
	public void closeGUI()
	{
		GUI.close();
	}
	
	public void welcomeText()
	{
		
		GUI.showMessage("Welcome to Monopoly");
	}
	
	public void turnText(String name)
	{
		GUI.getUserButtonPressed(name+"'s turn to roll!", "Roll");
	}
	
	public void setBalance(String name, int account)
	{
		GUI.setBalance(name, account);
	}
    
    public void removeCar(int fieldNumber, String name) {
    	
    	GUI.removeCar(fieldNumber, name);
    }
        
	public void setCar(int fieldNumber, String name) {
	    GUI.setCar(fieldNumber, name);
	}       
	
	public void setDices(int[] dices)
	{
		GUI.setDice(dices[0], dices[1]);
	}
	
	public void landOnField(String fieldName) {
		
		GUI.showMessage("You landed on the field: " + fieldName );
	}
	
	public void landOnElsesField() {
		
		GUI.getUserButtonPressed("This is owned by an opponent. You have to pay rent", "Pay rent");
	}
	
	public void landOnLabor(String fieldName)
	{
		GUI.getUserButtonPressed("You landed on "+fieldName+". Roll with the dices to determine rent", "Roll");
	}
	
	public void landOnTax() { 
		
		GUI.showMessage("You landed on tax. You have to pay 100");
	}
	
	public void landOnRefuge() { 
		
		GUI.showMessage("You have just recevied a bonus");
	}
	
	public void playerHasLost(String name, int field) {
		
		GUI.showMessage(name + "has lost. Rest of the players keeps playing.");
		GUI.removeCar(field, name);
		GUI.showMessage(name + "'s properties is now ownable again.");
	}
	
	public void playerHasWon(String name) {
		
		GUI.showMessage("Player: "+name+" has won!! Congratulations!");
	}
	
	public void landAsOwner() { 
		
		GUI.showMessage("You landed on your own field. Nothing happens");
	}
	
	public void landOnChance() {
			GUI.showMessage("You landed on chance field");
			}
			
				public void hasFreedom(){
					GUI.showMessage("You got Freedom chance card");
				}
				public void testMessage(String msg){
					GUI.showMessage(msg);
				}
		public void landOnJail() { 
		
		GUI.showMessage("You are in jail");}
	}

